package com.gitee.cirnochat.chat.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.gitee.cirnochat.common.model.enums.BaseEnum;
import lombok.Getter;

/**
 * 信令类型枚举
 * <p>
 * 用于标识 WebRTC 信令的类型，如 offer、answer、candidate 等。
 * </p>
 */
@Getter
public enum SignalType implements BaseEnum<Integer> {
    SUCCESS(-2, "ok"),
    FAILED(-1, "failed"),
    REJECT(0, "reject"),
    OFFER(1, "offer"),
    ANSWER(2, "answer"),
    CANDIDATE(3, "candidate"),
    DISCONNECT(4, "disconnect");

    @JsonValue
    @EnumValue
    private final Integer value;
    private final String description;

    SignalType(Integer value, String description) {
        this.value = value;
        this.description = description;
    }
}
